/*
 * @lc app=leetcode.cn id=1232 lang=javascript
 *
 * [1232] 缀点成线
 */

// @lc code=start
/**
 * @param {number[][]} coordinates
 * @return {boolean}
 */
var checkStraightLine = function(coordinates) {
    for(let i=0;i<coordinates.length-2;i++){
        let point1=coordinates[i]
        let point2=coordinates[i+1]
        let point3=coordinates[i+2]
        if((point3[1]-point2[1])*(point2[0]-point1[0])!==(point3[0]-point2[0])*(point2[1]-point1[1]))return false
    }
    return true
};
// @lc code=end

